package gunPowderMod.recipes;
import gunPowderMod.GunPowderMod;
import gunPowderMod.block.Fuse;
import net.minecraft.src.Block;
import net.minecraft.src.IRecipe;
import net.minecraft.src.InventoryCrafting;
import net.minecraft.src.Item;
import net.minecraft.src.ItemStack;
import net.minecraft.src.World;

public class MiningDynamiteRecipe implements IRecipe{

	@Override
	public boolean matches(InventoryCrafting inventory, World var2) {
		ItemStack tmp;
		for(int i=0;i<9;i++){
			if(i%3 == 1 && (tmp = inventory.getStackInSlot(i)) != null && tmp.getItem().getItemName().equals(GunPowderMod.refinedGunPowder.getItemName())){
				
			}else if(i%3 != 1 && (tmp = inventory.getStackInSlot(i)) != null && tmp.getItem().getItemName().equals(Item.paper.getItemName())){
				
			}else{
				return false;
			}
		}
		
		return true;
	}

	@Override
	public ItemStack getCraftingResult(InventoryCrafting inventory) {
		return new ItemStack(GunPowderMod.miningDynamiteBlock, 1);
	}

	@Override
	public int getRecipeSize() {
		// TODO Auto-generated method stub
		return 9;
	}

	@Override
	public ItemStack getRecipeOutput() {
		// TODO Auto-generated method stub
		return null;
	}

}
